package com.fanfanwang.ffw.app.constant;

import java.util.ArrayList;
import java.util.List;

import com.fanfanwang.ffw.app.bean.ServiceBean;

public class Constants {
	// 标志位用来区分用户是否登录
	public static boolean isLoginSuccess;
	// 变量用来保存用户登录后的手机号，作为全局传递使用的。
	public static String loginPhone;

	// 每页信息数
	public static final int infoCount = 6;

	// viewPager默认页数
	public static final int pagerCount = 4;
	
	
	// 按照Category对loader进行分类
	public static final String MRJX = "MRJX";
	public static final String YWAQ = "YWAQ";
	public static final String KCGY = "KCGY";
	public static final String SGXL = "SGXL";
	public static final String GGJS = "GGJS";
	public static final String JYKJ = "JYKJ";

	// 下载数据Url,header
	public static final String BASE_URL = "http://gw1.readni.net/";
	public static final String BASE_IMAGE_URL = "http://i1.rnimg.com/note/";
	public final static String CONTENT_TYPE = "text/xml;charset=utf-8";
	public final static String USER_AGENT = "ksoap2-android/2.6.0+";
	public final static String ACCESS_ENCODING = "gzip";
	// 应用墙webView的下载地址
	public final static String FRAGMENT_WALL_URL = "http://app.readni.com/wall";

	// 下载数据时，提交到服务器上的Content-Body
	public static final String MRJX_BODY = "<v:Envelope xmlns:i=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:d=\"http://www.w3.org/2001/XMLSchema\" xmlns:c=\"http://schemas.xmlsoap.org/soap/encoding/\" xmlns:v=\"http://schemas.xmlsoap.org/soap/envelope/\"><v:Header /><v:Body><readme xmlns=\"http://readme.org/webservice\" id=\"o0\" c:root=\"1\"><json i:type=\"d:string\">{\"SPId\":0,\"Index\":-1,\"PageSize\":24,\"SId\":10,\"CType\":0,\"AId\":241,\"TId\":4,\"Version\":\"1753-1-1 00:00:00\",\"Direction\":1}</json></readme></v:Body></v:Envelope>";
	public static final String YWAQ_BODY = "<v:Envelope xmlns:i=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:d=\"http://www.w3.org/2001/XMLSchema\" xmlns:c=\"http://schemas.xmlsoap.org/soap/encoding/\" xmlns:v=\"http://schemas.xmlsoap.org/soap/envelope/\"><v:Header /><v:Body><readme xmlns=\"http://readme.org/webservice\" id=\"o0\" c:root=\"1\"><json i:type=\"d:string\">{\"SPId\":0,\"Index\":-1,\"PageSize\":24,\"SId\":11,\"CType\":0,\"AId\":241,\"TId\":5,\"Version\":\"1753-1-1 00:00:00\",\"Direction\":1}</json></readme></v:Body></v:Envelope>";
	public static final String KCGY_BODY = "<v:Envelope xmlns:i=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:d=\"http://www.w3.org/2001/XMLSchema\" xmlns:c=\"http://schemas.xmlsoap.org/soap/encoding/\" xmlns:v=\"http://schemas.xmlsoap.org/soap/envelope/\"><v:Header /><v:Body><readme xmlns=\"http://readme.org/webservice\" id=\"o0\" c:root=\"1\"><json i:type=\"d:string\">{\"SPId\":0,\"Index\":-1,\"PageSize\":24,\"SId\":7,\"CType\":0,\"AId\":241,\"TId\":12,\"Version\":\"1753-1-1 00:00:00\",\"Direction\":1}</json></readme></v:Body></v:Envelope>";
	public static final String SGXL_BODY = "<v:Envelope xmlns:i=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:d=\"http://www.w3.org/2001/XMLSchema\" xmlns:c=\"http://schemas.xmlsoap.org/soap/encoding/\" xmlns:v=\"http://schemas.xmlsoap.org/soap/envelope/\"><v:Header /><v:Body><readme xmlns=\"http://readme.org/webservice\" id=\"o0\" c:root=\"1\"><json i:type=\"d:string\">{\"SPId\":0,\"Index\":-1,\"PageSize\":24,\"SId\":1,\"CType\":0,\"AId\":241,\"TId\":15,\"Version\":\"1753-1-1 00:00:00\",\"Direction\":1}</json></readme></v:Body></v:Envelope>";
	public static final String GGJS_BODY = "<v:Envelope xmlns:i=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:d=\"http://www.w3.org/2001/XMLSchema\" xmlns:c=\"http://schemas.xmlsoap.org/soap/encoding/\" xmlns:v=\"http://schemas.xmlsoap.org/soap/envelope/\"><v:Header /><v:Body><readme xmlns=\"http://readme.org/webservice\" id=\"o0\" c:root=\"1\"><json i:type=\"d:string\">{\"SPId\":0,\"Index\":-1,\"PageSize\":24,\"SId\":9,\"CType\":0,\"AId\":241,\"TId\":5,\"Version\":\"1753-1-1 00:00:00\",\"Direction\":1}</json></readme></v:Body></v:Envelope>";
	public static final String JYKJ_BODY = "<v:Envelope xmlns:i=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:d=\"http://www.w3.org/2001/XMLSchema\" xmlns:c=\"http://schemas.xmlsoap.org/soap/encoding/\" xmlns:v=\"http://schemas.xmlsoap.org/soap/envelope/\"><v:Header /><v:Body><readme xmlns=\"http://readme.org/webservice\" id=\"o0\" c:root=\"1\"><json i:type=\"d:string\">{\"SPId\":0,\"Index\":-1,\"PageSize\":24,\"SId\":8,\"CType\":0,\"AId\":241,\"TId\":6,\"Version\":\"1753-1-1 00:00:00\",\"Direction\":1}</json></readme></v:Body></v:Envelope>";

	// 数据库相关
	public static final String DB_NAME = "read";
	public static final String TABLE_NAME = "readyou";
	public static final String LOGIN_TABLE_NAME = "login";
	public static final String USER_INFO_TABLE = "userinfo";
	public static final String DETAIL_INFO_TABLE = "detailinfo";
	public static final String BOOK_TABLE_NAME = "book";
	public static final int VERSION = 1;

	// 把Index改为了Index1,因为index可能为关键字，不能作为字段名
	public static final String CREATE_TABLE_DDL = "CREATE TABLE IF NOT EXISTS "
			+ TABLE_NAME
			+ " (_id INTEGER PRIMARY KEY AUTOINCREMENT,"
			+ "RowNo INTEGER,Index1 INTEGER,SID INTEGER,"
			+ "SPId INTEGER,PageId INTEGER,Title TEXT,"
			+ "Summary TEXT,SumImg TEXT,CreateTime TEXT,"
			+ "State INTEGER,Version TEXT,Comments INTEGER,"
			+ "WeatherType,ReadTimes INTEGER,EventTime TEXT,"
			+ "UserId INTEGER,NickName TEXT,Logo TEXT,FState INTEGER,Category TEXT)";
	public static final String CREATE_TABLE_LOGIN = "create table if not exists "
			+ LOGIN_TABLE_NAME + " (PhoneNo TEXT PRIMARY KEY ,PassWord TEXT)";
	public static final String CREATE_TABLE_USERINFO = "create table if not exists "
			+ USER_INFO_TABLE
			+ " (PhoneNo TEXT PRIMARY KEY,NickName TEXT,Sex TEXT,Score TEXT,Address TEXT)";

	public static final String CREATE_TABLE_DETAIL = "create table if not exists "
			+ DETAIL_INFO_TABLE
			+ " (RowNo TEXT,Index1 TEXT,SId TEXT,SPId TEXT,PageId TEXT,Title TEXT,"
			+ "Summary TEXT,SumImg TEXT,CreateTime TEXT,State TEXT,Version TEXT,"
			+ "Comments TEXT,WeatherType TEXT,ReadTimes TEXT,EventTime TEXT,UserId "
			+ "TEXT,NickName TEXT,Logo TEXT,FState TEXT,NContent TEXT,Category TEXT,"
			+ "NPId TEXT,OrUserId TEXT,SCUserId TEXT,UpdateTime TEXT)";

	// 建一个表。里面包含合订本的名称和是否公开
	public static final String CREATE_TABLE_BOOK = "create table if not exists "
			+ BOOK_TABLE_NAME
			+ " (_id INTEGER PRIMARY KEY AUTOINCREMENT,BookName TEXT, IsPublic TEXT)";// 0表示不公开，1表示公开

}
